<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body>
    <script>
      let stus = [
        {
          name: '李四',
          lang: {
            js: 89,
            css: 78,
          },
        },
        {
          name: '小明',
          lang: {
            js: 99,
            css: 100,
          },
        },
        {
          name: '张三',
          lang: {
            js: 78,
            css: 25,
          },
        },
      ]

      let res = stus
        //成绩汇总
        .map((stu) => {
          stu.sum = stu.lang.js + stu.lang.css
          return stu
        })
        //降序
        .sort((a, b) => {
          return a.sum - b.sum
        })
        .filter((s) => {
          return s.sum / 2 > 60
        })

      console.table(res)
    </script>
  </body>
</html>
